package Ontologies;

import jade.content.AgentAction;

/**
 * Created with IntelliJ IDEA.
 * User: jiaka_000
 * Date: 13-5-13
 * Time:12:16
 * the action class for purchase request, will be attached with the REQUEST message
 * it is extended from query action, so it also have common name and latin name to indicate which type of tree
 */
public class PurchaseAction extends QueryAction {
    /**
     * how many trees the buyer want to buy
     * please notice that in response, the quantity of bought tree is not necessary as same as this number
     */
   private int quantity;

    /**
     * construct of PurchaseAction class
     *
     * @param commonName: the common name of the tree
     * @param latinName : the latin name of the tree
     * @param quantity    : the quantity of the tree
     */
    public PurchaseAction(String commonName, String latinName, int quantity) {
        super(commonName, latinName);
        this.quantity = quantity;
    }

    /**
     * default construct of QueryAction class
     */
    public PurchaseAction() {
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
}
